import { Navigate } from "react-router-dom"
import { Admin } from "@/utils/local"
function Back_admin({ children }: { children: any }) {

    const admininfo = Admin.get_Admin()
    if (admininfo.user) {

        return (children)

    } else {
        return <Navigate to="/home"></Navigate>
    }

}

export default Back_admin